Information reproducing apparatus, and buffer control method and program

ABSTRACT

A picture start code detecting section  131  detects the input timing of the leading data of a picture from TS packets inputted to a buffer  11 . A counter  132  outputs a timing signal at the time when the leading data of the picture has been inputted 30 times, thereby detecting the input timing of data of one second. A counter  133  counts the data amount of TS packets inputted to the buffer  11  during the period of time from the reception of a timing signal from the counter  132  to the next reception. The count value is read via a DFF  134  and inputted to a read control section  135 . The read control section  135  sets the input value from the DFF  134  as the reading speed of TS packets from the buffer  11.

TECHNICAL FIELD

The present invention relates to an information reproducing apparatusthat decodes and reproduces an encoded stream containing encoded data ofa content, time management information used for the reproduction of theencoded data, and a time reference value serving as the reference forthe time management information, and a buffer control method and programused for performing reproduction. More specifically, the presentinvention relates to an information reproducing apparatus, and a buffercontrol method and program, which are capable of properly decoding andreproducing the encoded data even when a deviation occurs in thetransmission timing of the time reference value.

BACKGROUND ART

In recent years, due to advances in image compression and encodingtechniques such as the MPEG scheme, it is now common to convert an imagesignal into a digital form for handling. For example, in the field oftelevision broadcasting, while digital broadcasting using BS(Broadcasting Satellite) has already been in use, recently, digitalterrestrial broadcasting has also been launched. These types of digitalbroadcasting use the MPEG scheme as the compression and encoding schemeto provide, in addition to conventional SD (Standard Definition) images,HD (High Definition) images with higher resolution.

On the other hand, there has been a rapid proliferation of digital videorecorders which record video signals as digital data onto an opticaldisk or an HDD (Hard Disk Drive). In recent years, in particular, muchattention is being given to a Blu-ray Disc as a portable optical diskwith higher capacity. Video recorders using such a Blu-ray Disc arealready on the market. A Blur-ray disc is capable of recording HD imagescompressed and encoded in the MPEG scheme for about two hours.

In digital video decoders, after an MPEG stream in the TS formatcompressed and encoded in the MEG scheme is received throughbroadcasting, the MPEG stream is recorded onto a recording medium as itis without any alterations, thus making it possible to retain the imagequality of the original image. The use of an HDD or Blur-ray disc, inparticular, allows the recording of not only an SD image but also an HDimage to be performed without causing a degradation in image quality.Further, recording the received data as it is also proves advantageousfrom the viewpoint of simplifying the configuration of the apparatus.

In the MPEG scheme, synchronous reproduction of video is realized byreferring to reproduction time information described in the data stream,and the time of a clock outputted by a reproducing apparatus.Specifically, for each individual access unit of video and audio data, aPTS (Presentation Time Stamp) as reproduction/output time managementinformation and, as required, a DTS (Decoding Time Stamp) as decodingtime management information are described. In addition, a PCR (ProgramClock Reference) and an SCR (System Clock Reference) are described asthe reference values for these time management information. By referringto the PCR and SCR values, the reproducing apparatus causes thereference time intended on the encoder side to be reproduced by means ofa synchronization signal called an STC (System Time Clock) inside thedecoder, and controls, on the basis of the value of this STC and the PTSand DTS, the decoding and reproduction/output timings of thecorresponding access unit.

As an example of conventional data transmission systems using a TS(Transport Stream) of the MPEG scheme as described above, there is asystem including a multiplexer that calculates a PCR correction value onthe basis of the arrival and expected output times of TS packets from aplurality of encoders based on a reference clock, thereby making itpossible to correct the PCR without receiving a reference clock from theencoders (see, for example, Japanese Unexamined Patent ApplicationPublication No. 9-321727 (paragraphs [0016] to [0030] and FIG. 1)).

DISCLOSURE OF INVENTION

In the case where the MPEG stream is received through broadcasting andrecorded as it is in the TS format onto the recording medium asdescribed above, when reading and reproducing the data, a deviation(jitter) occurs in the PCR described in the data, which makes itimpossible to perform reproduction properly.

Since an MPEG stream provided through digital broadcasting is relativelyfree from fluctuations in the transmission timing of TS packets, PCRjitter is not likely to occur when decoding and reproducing the receivedMPEG stream in real time. On the other hand, an MPEG stream read from arecording medium is temporarily recorded into a buffer before being readto an MPEG decoder. At this time, since the read timing of data from therecording medium to the buffer is controlled in accordance with the freespace available in the buffer, bursty data transmission is carried out.Accordingly, the transmission timing of the PCR in the MPEG streamtransmitted from the buffer to the MPEG decoder does not coincide withthe timing intended on the transmission side.

When PCR jitter in excess of the tolerance of PCR jitter for the MPEGdecoder occurs, such phenomena as the freezing or blackout of thescreen, and buzz and silence occur with respect to the video and audio,respectively, which makes it impossible to perform reproductionproperly. Further, the same problem can also occur due to fluctuationsin transmission timing in the case where image data is received via atransmission path such as the Internet.

The present invention has been made in view of the above-mentionedproblems. Accordingly, it is an object of the present invention toprovide an information reproducing apparatus in which, even when thetransmission timing of a time reference value in the encoded streamdeviates from the timing intended on the encoder side, the encodedstream can be properly decoded by the decoder for reproduction.

Further, it is another object of the present invention to provide abuffer control method for controlling the reading of a buffer thatsupplies data to a decoder so that even when the transmission timing ofa time reference value in the encoded stream deviates from the timingintended on the encoder side, the encoded stream can be properly decodedby the decoder for reproduction.

Further, it is still another object of the present invention to providea buffer control program for controlling the reading of a buffer thatsupplies data to a decoder so that even when the transmission timing ofa time reference value in the encoded stream deviates from the timingintended on the encoder side, the encoded stream can be properly decodedby the decoder for reproduction.

In order to solve the above-mentioned problems, according to the presentinvention, there is provided an information reproducing apparatus whichdecodes and reproduces an encoded stream containing encoded data of acontent, time management information used for reproduction of theencoded data, and a time reference value serving as a reference for thetime management information, including: a buffer that temporarily storespackets constituting the encoded stream and sequentially supplies thepackets to a decoder; leading data detecting means for detecting aninput timing of leading data of an access unit of the content from thepackets inputted to the buffer; data amount detecting means fordetecting a data amount of the packets inputted to the buffer; and readcontrol means for setting, as a reading speed of the packets from thebuffer, an amount of data detected by the data amount detecting meansduring a period of time until an input timing of the leading data isdetected a predetermined number of times by the leading data detectingmeans.

According to the information reproducing apparatus as described above,the period of time during which the leading data of the access unitinputted to the buffer is inputted a predetermined number of timesbecomes substantially constant, so the amount of data inputted to thebuffer during this period substantially coincides with the packettransmission rate intended on the encoder side during that period.Accordingly, by controlling packets to be transmitted from the buffer tothe decoder at this transmission rate by the read control means, thetransmission timing of the time reference value can be made to approachthe timing intended on the encoder side.

Further, according to the present invention, there is provided A buffercontrol method for controlling a read operation of a buffer whendecoding and reproducing an encoded stream containing encoded data of acontent, time management information used for reproduction of theencoded data, and a time reference value serving as a reference for thetime management information, the buffer being configured to temporarilystore packets constituting the encoded stream and sequentially supplythe packets to a decoder, including: detecting by leading data detectingmeans an input timing of leading data of an access unit of the contentfrom the packets inputted to the buffer; detecting by data amountdetecting means a data amount of the packets inputted to the buffer;setting by read control means, as a reading speed of the packets fromthe buffer, an amount of data detected by the data amount detectingmeans during a period of time until an input timing of the leading datais detected a predetermined number of times by the leading datadetecting means.

According to the buffer control method as described above, the period oftime during which the leading data of the access unit inputted to thebuffer is inputted a predetermined number of times becomes substantiallyconstant, so the amount of data inputted to the buffer during thisperiod substantially coincides with the packet transmission rateintended on the encoder side during that period. Accordingly, bycontrolling packets to be transmitted from the buffer to the decoder atthis transmission rate by the read control means, the transmissiontiming of the time reference value can be made to approach the timingintended on the encoder side.

According to the present invention, even when a deviation occurs betweenthe transmission timing of the time reference value in the encodedstream inputted to the buffer, and the timing intended on the encoderside, the amount of such a deviation can be suppressed at the time ofoutput from the buffer, thereby making it possible to properlydecode/reproduce the encoded stream by the decoder to enhance thequality of the outputted content irrespective of the characteristics ofthe decoder.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing the schematic configuration of an opticaldisk apparatus according to an embodiment of the present invention.

FIG. 2A is a diagram illustrating the correction of an STC using a PCR.

FIG. 2B is a diagram illustrating the correction of an STC using a PCR.

FIG. 3 is a diagram illustrating the reception timing of TS packetssubject to transmission path fluctuations.

FIG. 4 is a diagram illustrating how data is transmitted when readingand decoding the MPEG stream recorded on a recording medium.

FIG. 5 is a diagram showing the functions for performing buffer readingcontrol in the optical disk apparatus according to the embodiment.

FIG. 6 is a diagram schematically illustrating the input/output timingof TS packets in the buffer.

BEST MODE FOR CARRYING OUT THE INVENTION

An embodiment of the present invention as applied to an optical diskapparatus will be described below in detail with reference to thedrawings.

FIG. 1 is a diagram illustrating the schematic configuration of theoptical disk apparatus according to the embodiment.

FIG. 1 shows as an example the configuration of an optical diskapparatus that can receive a digital broadcast and record the digitalbroadcast onto an optical disk 1. This image recording/reproducingapparatus includes a tuner section 2, a demodulation section 3, an ECC(Error Correcting Code) processing section 4, a write-signal generatingsection 5, a laser driver 6, an optical pickup 7, an equalizer 8, a PLL(Phase Locked Loop) 9, an AD converter 10, a buffer 11, and an MPEGdecoder 12. The ECC processing section 4 includes an ECC encoder 41 andan ECC decoder 42. Further, there is provided a system controller 13that performs centralized control of the above-mentioned respectiveblocks. It should be noted that a rewritable Blu-ray Disc or the like,for example, is used as the optical disk 1.

In response to the input of a broadcast wave received by an externalantenna, the tuner section 2 selects a signal of a predetermined carrierfrequency in accordance with an instruction from the system controller13, and outputs the selected reception signal to the demodulationsection 3. The broadcast wave may be, for example, a terrestrial wave,or a satellite wave replayed by the BS or CS. Further, the broadcastsignal may be received via a wire cable. The demodulation section 3applies QPSK (Quadrature Phase Shift Keying) demodulation and errorcorrection processing to the broadcast signal from the tuner section 2.Further, the demodulation section 3 separates necessary TS packets fromthe data stream on which the processing has been performed. Whenrecording data onto the optical disk 1, the demodulation section 3supplies the TS packets to the ECC encoder 41 of the ECC processingsection 4, and when reproducing data, the demodulation section 3supplies the TS packets to the buffer 11.

The ECC encoder 41 adds an error correction code to the data from thedemodulation section 3, and further performs 8/16 modulation on thedata. The write-signal generating section 5 outputs a control signal tothe laser driver 6 in response to a signal from the ECC encoder 41. Atthis time, the signal output timing with respect to the laser driver 6is controlled so as to be synchronized with the rotation control of theoptical disk 1 by the system controller 13. In response to a controlsignal from the write-signal generating section 5, the laser driver 6drives a recording laser diode of the optical pickup 7, therebyrecording the MPEG stream received through broadcasting onto the opticaldisk 1.

On the other hand, a signal read from the optical disk 1 by the opticalpickup 7 is supplied to the equalizer 8. The equalizer 8 corrects thefrequency characteristics of the input signal to shape the signalwaveform. The AD converter 10 converts the output signal from the PLL 9into a digital signal. The ECC decoder 42 applies demodulation and errorcorrection processing to the digital signal thus converted by the ADconverter 10. Accordingly, TS packets containing video and audio aresequentially outputted from the ECC decoder 42 to the buffer 11.

TS packets stored in the buffer 11 are outputted to the MPEG decoder 12through the control of the system controller 13. On the basis ofreference time (STC) from the system controller 13, the MPEG decoder 12decompresses and decodes the video data and audio data in the TS packetsfrom the buffer 11. Accordingly, video and audio signals are reproducedfrom the MPEG stream read from the optical disk 1, and are outputted tothe external via an interface circuit (not shown).

It should be noted that when the MPEG stream received throughbroadcasting is to be reproduced in real time, the TS packets from thedemodulation section 3 are sequentially stored into the buffer 11, andin the same manner as described above, these TS packets are supplied tothe MPEG decoder 12 for decompression and decoding processing.

In the optical disk apparatus according to this embodiment, inparticular, the MPEG stream received through digital broadcasting can berecorded onto the optical disk 1 as it is in the TS format. Accordingly,recording can be performed without any alterations such as decoding andrecoding with respect to the video data and audio data within the TSpackets. It is thus possible to prevent degradation in image or soundquality and also simplify the apparatus configuration and processingsystem for effecting recording.

Next, description will be given of how the timing for performingdecoding with the MPEG decoder 12 is controlled.

In the MPEG stream, a PTS as reproduction/output time managementinformation is described for each individual access unit of video andaudio data. As for the video data, a DTS as decoding time managementinformation is additionally described as required. On the other hand,the system controller 13 outputs an STC of 27 MHz that serves as thereference time for each time management information mentioned above.When the time indicated by the STC and the time indicated by the DTScoincide with each other, the MPEG decoder 12 decodes the correspondingvideo, and when the time indicated by the STC and the time indicated bythe PTS coincide with each other, the MPEG decoder 12 reproduces andoutputs the corresponding video data or audio data.

Further, a PCR as a reference value for the PTS and DTS is described inthe MPEG-2 TS packet. By correcting the STC by using the value of thisPCR, in the MPEG decoder 12, decoding is executed at the timing intendedon the encoder side.

FIGS. 2A and 2B are diagrams illustrating the correction of the STCusing the PCR.

FIGS. 2A and 2B assume a case where TS packets are transmitted throughbroadcasting.

As shown in FIG. 2A, the reference time synchronized with a video clockof 27 MHz is generated on the transmission side. The value of thereference time at the transmission timing of a TS packet is written intothe storage field (47 bits) for the PCR provided in that TS packet.

On the other hand, a VCO (Variable Controller Oscillator) of 27 MHz isprovided on the TS packet receiving side, and the STC is generated by acounter with this VCR as the clock. As shown in FIG. 2B, when the firstPCR is received from the TS packet that has been received, the countvalue of the STC at that point is changed to the value of the PCR.Thereafter, PCRs are transmitted at an interval of 0.1 msec or less.When a PCR is received on the reception side, the count value of the STCand the value of the PCR at that point are compared against each other,and the oscillation frequency of the VCO is controlled on the basis ofthe difference between these values, thereby making it possible toperform decoding in the manner as intended on the transmission side. Inthe example shown in FIG. 2B, a TS packet with a PCR value of “10” isreceived when the STR is “12”, so it is appreciated that the time atwhich the STC is generated is mode advanced. Accordingly, theoscillation frequency of the VCO is controlled so as to become lower.Conversely, if the PCR value is larger than the STC count value, theoscillation frequency of the VCO is controlled so as to become higher.Through such control, on the reception side, decoding is continued atthe timing intended on the transmission side.

Incidentally, when TS packets being transmitted through a transmissionpath are subject to fluctuations, the above-mentioned control of theoscillation frequency of the VCO may not be performed properly.

FIG. 3 is a diagram illustrating the TS packet receiving timing in thecase where TS packets are subject to transmission path fluctuations.

When a TS packet is transmitted through digital broadcasting, since thetransmission path is taken up by the MPEG stream, the TS packets aresubject to hardly any transmission path fluctuation as they aretransmitted. Accordingly, when TS packets received through digitalbroadcasting are to be reproduced in real time, the control of theoscillation frequency of the VCO is usually performed almost properly.In the example shown in FIG. 3, under an ideal reception condition withno transmission path fluctuation, the STC count value becomes “12” atthe time when a TS packet with a PCR value of “10” is received.

However, in the event of transmission path fluctuations during thetransmission of TS packets via the Internet, for example, the PCRreception timing becomes inaccurate. Such a deviation in PCR receptiontiming is referred to as PCR jitter. For example, consider a case where,as shown in FIG. 3, the reception timing of TS packets becomes earlierdue to the influence of transmission path fluctuations, and hence a TSpacket with a PCR value of “10” is received at the time when the STCcount value is “10”. In this case, although this corresponds to asituation where the oscillation frequency should be lowered, the outputtiming of the STC is judged to be correct on the transmission side.

Accordingly, when decoding is continued without changing the oscillationfrequency of the VCO, the data decoding and reproduction/output timingsbecome discontinuous, which makes it impossible to output video or audiocontinuously in a proper manner. The ISO/IEC (International Organizationfor Standardization/International Electrotechnical Commission) 13818-9standard prescribes the PCR jitter tolerance to be ±50 μsec. Although itis possible to keep the PCR jitter within this tolerance in thereception of a digital broadcast, in the case of MPEG streamdistribution via the Internet or the like, the PCR jitter can exceedthis tolerance.

FIG. 4 is a diagram illustrating how data transmission is performed whenreading and decoding an MPEG stream recorded on a recording medium.

In the optical disk apparatus according to this embodiment, an MPEGstream in the TS format received through digital broadcasting can berecorded onto the optical disk 1 as it is. However, when the MPEG streamis recorded onto the recording medium in this way, even though a TSpacket is received at almost the same timing as intended on thetransmission side, information on the reception timing is lost at thetime when the MPEG stream is recorded onto the recording medium, so PCRjitter may occur.

Specifically, as shown in FIG. 4, TS packets of the MPEG stream readfrom the optical disk 1 are temporarily accumulated in the buffer 11before being read by the MPEG decoder 12. Since the reading speed ofdata from the optical disk 1 is controlled in accordance with the amountof free space available in the buffer, TS packets are transmitteddiscontinuously with respect to the buffer 11. Accordingly, as in thecase described above with reference to FIG. 3, fluctuations occur in theTS packet transmission path from the buffer 11 to the MPEG decoder 12,so the transmission timing of the PCR no longer coincides with thetiming intended on the transmission side, resulting in PCR jitter. Theamount of PCR jitter occurring in this case may sometimes far exceed theabove-mentioned prescribed tolerance, ranging from several tens msec toseveral hundreds msec.

Such PCR jitter occurs when information on the arrival times of TSpackets at the time of reception through digital broadcasting is lost asthe MPEG stream is recorded onto the recording medium. Accordingly, forexample, the occurrence of PCR jitter can be prevented by also recordinginformation on the arrival times of respective TS packets at the time ofreception onto the recording medium in advance, and using thisinformation at the time of reproduction for the control of thetransmission speed to the MPEG decoder 12. However, this method is notpreferable from the viewpoint of the capacity of the recording mediumand the complexity of the processing at the time of recording.

In contrast, the arrival times of TS packets can be estimated on thebasis of the data rate at the time of transmitting the TS packets. Thatis, if the inverse of the data rate is read from the buffer 11 and setas the read cycle, it is possible to restore the transmission timing atthe time of reception almost completely. Accordingly, in thisembodiment, the data rate of TS packets within the recording medium isdetected as appropriate at the time of reading, and the reading speedfrom the buffer 11 is controlled in accordance with the data rate thusdetected, thereby suppressing the occurrence of PCR jitter.

Specifically, the data amount of TS packets read from the optical disk 1is detected on a picture-by-picture basis. Since the progressive HDTVformat prescribes a rate of 30 frames/second, the data rate can bedetermined by detecting the data amount of TS packets corresponding toone picture. In the video ES (Elementary Stream) in the MPEG stream,“0x00_(—)00_(—)01_(—)00” as a picture start code (Picture_Start_Code) isdescribed at the leading end of the picture, and the data amount fromthe detection of a picture start code to the next detection of a picturestart code can be set as the data rate.

It should be noted, however, that since it is permitted to vary theencoding rate in the MPEG-2 scheme, if the data rate is reflected on apicture-by-picture basis, the reading speed from the buffer 11 maylargely vary frequently. In actuality, the PCR jitter suppression effectcan be attained even when the reading speed is adjusted on the basis ofan average data rate over 1 second, for example. In this embodiment, asan example, the data amount of 30 frames, that is, one second, isdetected as the data rate.

FIG. 5 is a diagram showing the functions for reading the buffer 11 inthe optical disk apparatus according to this embodiment.

As shown in FIG. 5, the optical disk apparatus according to thisembodiment includes a picture start code detecting section 131, counters132 and 133, a delay flip-flop (DFF) 134, and a read control section135. These components are realized as the functions of the systemcontroller 13, for example.

The picture start code detecting section 131 receives the input of TSpackets read from the optical disk 1 and outputted from the ECC decoder42 to the buffer 11. At the same time, the picture start code detectingsection 131 receives from the ECC decoder 42 a data enable signalindicating the write timing of data with respect to the buffer 11. Thepicture start code detecting section 131 monitors the data of theinputted TS packets with the reception timing of the data enable signalas the clock, and outputs a detection signal upon detecting the picturestart code.

The counter 132 counts the number of times a detection signal isoutputted from the picture start code detecting section 131. The counter132 outputs a timing signal when the count reaches 30, and also resetsthe count value. Accordingly, a timing signal is outputted from thecounter 132 each time TS packets required for the reproduction of 1second of video and audio are inputted to the buffer 11.

The counter 133 receives the data enable signal with respect to thebuffer 11 as a clock, and counts the number of times this signal isinputted. Further, the counter 133 resets the count value at the outputtiming of the timing signal from the counter 132.

The DFF 134 latches the count value outputted from the counter 133 atthe output timing of a control signal from the counter 132. Accordingly,the value latched by the DFF 134 is equal to the data amount of TSpackets required for reproducing one second of video and audio inputtedto the buffer 11 immediately before the latching. This data amount isdefined as the data rate.

The read control section 135 adjusts the reading speed of data from thebuffer 11 to the MPEG decoder 12 in conformity to the data rateoutputted by the DFF 134. That is, the reading speed is raised when theinputted data rate has increased, and the reading speed is lowered whenthe data rate has decreased.

FIG. 6 is a diagram schematically showing the input/output timing of TSpackets in the buffer 11.

As shown in FIG. 6, TS packets are read from the optical disk 1intermittently, so the interval at which the thirtieth picture code isdetected by the counter 132 does not become constant. In other words,the read time of data required for reproducing one second of video andaudio does not become constant.

In contrast, since the reading of TS packets from the buffer 11 isadjusted in accordance with the data rate, thus averaging out theinterval at which the data for reproducing one second of video and audiois transmitted. Accordingly, the PCR transmission timing approaches thetiming intended on the encoder side (which in this case is thetransmission side of a digital broadcast), thereby suppressing theamount of PCR jitter. The MPEG decoder 12 can thus properly decode videoand audio at all times for reproduction and output, therebysignificantly reducing the probability of the occurrence of suchsymptoms as the freezing or blackout of the screen, and buzz or silence.

As described above, although the PCR jitter tolerance is standardized,tolerances in MPEG decoders that are actually on the market are notnecessarily the same. For example, in some MPEG decoders, the screen mayfreeze when PCR jitter of 1 μsec occurs, whereas in other MPEG decoders,the screen functions properly even when PCR jitter of 100 μsec occurs.Further, since whether or not the screen functions properly also dependson the contents of the MPEG stream to be decoded, the proper functioningof a screen at the time of testing does not guarantee the properfunctioning of that screen after it is put into the market. Therefore,it is desirable to suppress the amount of PCR jitter as reliably aspossible. In this regard, by controlling the transmission timing of TSpackets with respect to the MPEG decoder 12 as described above, it ispossible to achieve enhanced stability of the quality of the reproducedvideo and audio irrespective of the type of the MPEG decoder used.

While in the above-mentioned embodiment the reception timing of theleading end of a picture is used to detect the data rate of TS packets,this should not be construed restrictively. The reception timing of theleading end of the access unit of video and audio data may be used aswell. Accordingly, as for the encoded stream to be reproduced, otherthan one including respective data of video and audio, the presentinvention is also applicable to one including only audio data. Further,the stream encoding scheme is not limited to the MPEG scheme but otherencoding schemes may also be used.

Further, while in the above-mentioned embodiment an optical disk is usedas the recording medium for recording the encoded stream to bereproduced, other recording media such as an HDD or a memory card usinga semiconductor memory may also be used. Further, the encoded stream tobe recorded is not limited to one received through broadcasting but mayalso be one received via a network, for example. Alternatively, thepresent invention is also applicable to the reproduction of an encodedstream previously recorded onto a read-only optical disk or the like,for example, commercially available video contents such as a movie.

Further, other than an encoded stream recorded on a recording medium,the present invention is also applicable to the real-timedecoding/reproduction of an encoded stream received via a transmissionpath in which the data being transmitted can be subject to fluctuations,such as the Internet.

The above-mentioned processing function can be realized by a computer.In that case, a program describing the processing contents of functionsthat should be included in an information reproducing apparatus isprovided. By executing the program by a computer, the above-mentionedprocessing function is realized on the computer. The program describingthe contents of processing can be recorded in advance onto acomputer-readable recording medium. Examples of a computer-readablerecording medium include a magnetic recording apparatus using a magnetictape or a magnetic disc, an optical disk, a magneto-optical recordingmedium, and a semiconductor memory.

When distributing a program, for example, a portable recording mediumsuch as an optical disk recording that program is offered for sale.Further, it is also possible to store a program in advance into thestorage unit of a server computer, and transfer that program from theserver computer to another computer via a network.

The computer executing a program stores, for example, a program recordedon a portable recording medium or a program transferred from a servercomputer, into the storage unit of its own. Then, the computer readsthat program from the storage unit of its own, and executes processingaccording to the program. It should be noted that the computer may alsoread a program directly from the portable recording medium and executeprocessing according to that program. Further, the computer may alsosequentially execute, each time a program is transferred from the servercomputer, processing according to the program that has been received.

1. An information reproducing apparatus which decodes and reproduces anencoded stream containing encoded data of a content, time managementinformation used for reproduction of the encoded data, and a timereference value serving as a reference for the time managementinformation, comprising: a buffer that temporarily stores packetsconstituting the encoded stream and sequentially supplies the packets toa decoder; leading data detecting means for detecting an input timing ofleading data of an access unit of the content from the packets inputtedto the buffer by counting a number of times a picture start code isdetected in the packets inputted to the buffer; data rate detectingmeans for detecting a data rate at which the packets are inputted to thebuffer; and read control means for setting a reading speed of thepackets from the buffer based on the data rate detected by the data ratedetecting means during a predetermined period of time, in which thepredetermined period of time corresponds to a time period in which aninput timing of the leading data is detected a predetermined number oftimes based on the number of times the picture start code is detected bythe leading data detecting means.
 2. The information reproducingapparatus according to claim 1, wherein the read control means resets areading speed of the packets from the buffer each time an input timingof the leading data is detected by the leading data detecting means. 3.The information reproducing apparatus according to claim 1, wherein whenthe encoded data contains a moving image as the content, the leadingdata detecting means detects an input timing of leading data of apicture from the packets.
 4. The information reproducing apparatusaccording to claim 1, further comprising reading means for reading froma recording medium storing the encoded data, wherein the encoded streamread from the recording medium by the reading means is inputted to thebuffer.
 5. A buffer control method for controlling a read operation of abuffer when decoding and reproducing an encoded stream containingencoded data of a content, time management information used forreproduction of the encoded data, and a time reference value serving asa reference for the time management information, the buffer beingconfigured to temporarily store packets constituting the encoded streamand sequentially supply the packets to a decoder, comprising: detectingby use of a leading data detecting section an input timing of leadingdata of an access unit of the content from the packets inputted to thebuffer by counting a number of times a picture start code is detected inthe packets inputted to the buffer; detecting by use of a data ratedetecting section a data rate at which the packets are inputted to thebuffer; setting by use of a read control section a reading speed of thepackets from the buffer based on the data rate detected by the data ratedetecting section during a predetermined period of time, in which thepredetermined period of time corresponds to a time period in which aninput timing of the leading data is detected a predetermined number oftimes based on the number of times the picture start code is detected bythe leading data detecting section.
 6. A non-transitorycomputer-readable recording medium having stored thereon a buffercontrol program for causing a computer to execute processing ofcontrolling a read operation of a buffer when decoding and reproducingan encoded stream containing encoded data of a content, time managementinformation used for reproduction of the encoded data, and a timereference value serving as a reference for the time managementinformation, the buffer being configured to temporarily store packetsconstituting the encoded stream and sequentially supply the packets to adecoder, the buffer control program comprising: detecting an inputtiming of leading data of an access unit of the content from the packetsinputted to the buffer by counting a number of times a picture startcode is detected in the packets inputted to the buffer; detecting a datarate at which the packets are inputted to the buffer; and setting areading speed of the packets from the buffer based on the data ratedetected by the data detecting during a predetermined period of time, inwhich the predetermined period of time corresponds to a time period inwhich an input timing of the leading data is detected a predeterminednumber of times based on the number of times the picture start code isdetected.